-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround permission issue on Android API30 emulators when pulling test results #64744
Conversation
…est results See dotnet/xharness#385, we use the cache dir instead on API 30. Also add `a:exported="true"` which is required when targetting a newer minSdkVersion.
Tagging subscribers to this area: @directhex Issue DetailsSee dotnet/xharness#385, we use the cache dir instead on API 30. Also add
|
public static int initialize(String entryPointLibName, String[] args, Context context) { | ||
String filesDir = context.getFilesDir().getAbsolutePath(); | ||
String cacheDir = context.getCacheDir().getAbsolutePath(); | ||
String docsDir = getDocsDir(context); | ||
|
||
File docsPath = context.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the value of Environment.DIRECTORY_DOCUMENTS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am asking because before we were setting env var DOCSDIR
and I don't understand whether this is the same?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the enum value? It's the string Documents
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so it's something from Android
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it's unrelated to the env var we set.
In dotnet#64744 I changed the name of the env variable used to store the test results directoy but I didn't notice that the runtime tests don't use the same runner. Fixes dotnet#64920
See dotnet/xharness#385, we use the cache dir instead on API 30.
Also add
a:exported="true"
which is required when targetting a newer minSdkVersion.